package com.ss.android.wenda.c;

import android.content.res.Resources;
import android.text.SpannableStringBuilder;
import android.view.View;
import android.widget.TextView;
import com.ss.android.article.base.ui.EllipsisAppendSuffixTextView.a;
import com.ss.android.article.base.ui.EllipsisAppendSuffixTextView;
import com.ss.android.article.base.utils.b.d;
import com.ss.android.article.base.utils.b.e;
import com.ss.android.article.common.ThumbGridLayout;
import com.ss.android.wenda.model.Question;

final class m implements a {
    public final l c;
    private final EllipsisAppendSuffixTextView d;
    public final TextView a;
    public final Question b;
    private final Resources e;

    m(l arg1, EllipsisAppendSuffixTextView arg2, TextView arg3, Question arg4, Resources arg5) {
        this.c = arg1;
        this.d = arg2;
        this.a = arg3;
        this.b = arg4;
        this.e = arg5;

    }

    public final void a() {
        if((this.d.a) || (this.d.b)) {
            String v1 = this.d.getText().toString();
            View v0 = this.c.b().a.findViewById(com.ss.android.article.browser.R.id.question_thumb_container);
            SpannableStringBuilder v2 = new SpannableStringBuilder(((CharSequence)v1));
            v2.setSpan(new e("", new n(this, ((ThumbGridLayout)v0)), this.e.getColor(com.ss.android.article.browser.R.color.update_comment_more_text_selector), this.e.getColor(com.ss.android.article.browser.R.color.ssxinzi2)), v1.length() - 3, v1.length(), 33);
            this.a.setVisibility(View.VISIBLE);
            this.a.setText(((CharSequence)v2));
            this.a.setMovementMethod(new d());
            this.d.setVisibility(View.GONE);
        }
    }
}

